package com.fingard.net.listener;

import java.net.Socket;
import java.util.Date;

public class SocketReceiver {

    public byte[] reqBytes;
    public int contentLength ;
    public int contentStartIndex ;
    public int readedLength;
    public Socket socketClient;
    public String initCharset;
    public String sourceIP;
    public int receiveOffSet;
    public String action;
    public int readHeadStartIndex;
    public boolean isCompleted;
    public int seqIDInner;
    public Date connTime;
    public String ip;
    public int port;
    public Date recCompleteTime;

    public SocketReceiver(Socket p_socket, String p_initCharset) {
        socketClient = p_socket;
        initCharset = p_initCharset;
        reset();
    }

    public void reset(){
        contentLength = -1;
        contentStartIndex = -1;
        readedLength = 0;
        receiveOffSet = 0;
        readHeadStartIndex=0;
        isCompleted = false;
    }

}
